/**
 * 通用类型定义
 */

// 通用返回结果
export interface Result<T = any> {
  code: number
  message: string
  data: T
  timestamp: number
}

// 分页结果
export interface PageResult<T = any> {
  total: number
  records: T[]
  current: number
  size: number
}

// 登录请求
export interface LoginForm {
  username: string
  password: string
}

// 登录返回
export interface LoginVO {
  token: string
  userId: number
  username: string
  realName: string
  roleCode: string
  roleName: string
  needChangePassword: number  // 需要修改密码：0否 1是
  infoCompleted: number  // 个人信息是否完善：0否 1是
}

// 用户信息
export interface UserInfo {
  id: number
  username: string
  realName: string
  phone?: string
  roleName: string
  roleCode: string
  status: number
}

// 学生信息
export interface Student {
  id?: number
  studentNo: string
  realName: string
  gender: number
  genderText?: string
  birthday?: string
  deptId: number
  deptName?: string
  classId: number
  className?: string
  enrollDate?: string
  address?: string
  phone?: string
  status: number
  statusText?: string
  remark?: string
}

// 角色
export interface Role {
  id: number
  roleName: string
  roleCode: string
  remark?: string
}

// 院系
export interface Dept {
  id?: number
  deptName: string
  deptCode: string
  parentId?: number
  leaderId?: number
  sort?: number
  remark?: string
}

// 班级
export interface Classes {
  id?: number
  className: string
  classCode: string
  deptId: number
  deptName?: string
  headTeacherId?: number
  headTeacherName?: string
  enrollYear?: number
  remark?: string
}

// 菜单路由
export interface MenuItem {
  id: number
  menuName: string
  path: string
  parentId: number
  permission?: string
  icon?: string
  sort: number
  menuType: number
  children?: MenuItem[]
}

